package com.mwj.spjm.resource;

import com.mwj.spjm.service.HelloService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.QueryParam;

@Component
@Path("/hello")
public class HelloResource {

    @Autowired
    private HelloService helloService;

    @Path("/say")
    @GET
    public String say(@QueryParam("name") String name){

        return helloService.say(name);
    }
}
